package com.demo.config;

import com.demo.entity.DataBean;
import com.demo.entity.Notice;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : mifei
 * @date : 2021/10/11
 */

@Configuration
public class AppConfig {

    @Bean
    public DataBean dataBean(){
        DataBean dataBean = new DataBean();
        //dataBean.setNoticeContent("bean1");
        dataBean.setNoticeContent(notice());
        return dataBean;
    }
    @Bean
    public DataBean dataBean2(){
        DataBean dataBean = new DataBean();
        //dataBean.setNoticeContent("bean2");
        dataBean.setNoticeContent(notice());
        return dataBean;
    }

    @Bean
    public String notice(){
        System.out.println(11);
        return "123";
    }

}

